<?php

/**
 * Copyright              [HD框架] (C)2011-2012 houdunwang ，Inc. 
 * Encoding               UTF-8 
 * Version                $Id: commonControl      2012-8-20 20:44:15
 * @author                向军
 * Link                   http://www.houdunwang.com       
 * E-mail                 houdunwangxj@gmail.com
 */
class commonControl extends Control {

    function __auto() {
        if ($this->rbac_is_login()) {
            if (!$this->rbac_check_access()) {
                if (CONTROL == 'index' && METHOD == 'index') {
                    go("index/index/index");
                }
                $this->error("没有操作权限");
            }
        } else {
            go("index/login_show");
        }
    }

}

?>
